<template>
  <block>
    <v-article
      :title="data.title"
      :user_name="data.title"
      :content="data.title || ''"
    ></v-article>
  </block>
</template>

<script>
import Api from '@/common/api';
import article from '@/components/article'
import { mapState, mapActions } from 'vuex'
export default {
data() {
    return {
      data: ''
    }
  },
  async onLoad(params) {
    this.clearReadContent({type: 'essay'})
    const { id } = params

        let params1 = {'id':params.id};
                   	let data = await Api.apiCall('get',Api.cms.subjectDetail,params1);
                   	this.data=data;
  },
  components: {
    'v-article': article
  },
  computed: {
    ...mapState('read', ['readContent'])
  },
  methods: {
    ...mapActions('read', ['getReadContent', 'clearReadContent'])
  }
}
</script>

<style scoped>

</style>
